Conventionally, there is a game where a user operates a mobile hand-held terminal (hand-held game apparatus) while holding it, and an event is executed in accordance with the attitude and the position of the mobile hand-held terminal in real space. The mobile hand-held terminal includes a sensor that detects the position and the attitude of the mobile hand-held terminal in real space, and the user of the terminal advances the game by moving the mobile hand-held terminal and changing the attitude of the mobile hand-held terminal. For example, in accordance with the attitude of the mobile hand-held terminal in real space, the mobile hand-held terminal scrolls an image displayed on a display screen of the mobile hand-held terminal. Then, a scope is displayed at the center of the display screen of the mobile hand-held terminal, so that when a predetermined button of the mobile hand-held terminal has been pressed in the state where a virtual object (e.g., an insect object) is included in the scope, it is considered that the virtual object has been caught in the scope.
The mobile hand-held terminal described above, however, merely allows the operation of scrolling the image on the basis of the attitude of the mobile hand-held terminal, and placing the virtual object in the scope displayed in a fixed manner at the center of the display screen of the mobile hand-held terminal. It is not possible to, for example, control the virtual object per se, the scope, and the like in accordance with the operation of a user. Thus, it is merely possible to perform the operation of scrolling an image, which leads to monotonous operations. This may possibly reduce the verisimilitude and the fun of operations.
Therefore, it is an object of the exemplary embodiment to provide a storage medium having stored thereon an information processing program capable of, when a plurality of objects appear in a virtual world, varying the operations of a user to be performed on the objects, and an information processing apparatus, an information processing system, and an information processing method that are capable of, when a plurality of objects appear in a virtual world, varying the operations of a user to be performed on the objects.
To achieve the above object, the exemplary embodiment may employ, for example, the following configurations. It is understood that when the description of the scope of the appended claims is interpreted, the scope should be interpreted only by the description of the scope of the appended claims. If the description of the scope of the appended claims contradicts the description of these columns, the description of the scope of the appended claims has priority.
In an exemplary configuration of a computer-readable storage medium having stored thereon an information processing program according to the exemplary embodiment, the information processing program is executed by a computer of an information processing apparatus capable of displaying an image on a portable display apparatus that outputs at least body state data based on an attitude and/or a motion of the portable display apparatus body and touch position data based on a touch position on a touch panel provided in the portable display apparatus. The information processing program causes the computer to execute: controlling, on the basis of the body state data, an action of a first object placed in a virtual world; controlling, on the basis of the touch position data, an action of a second object placed in the virtual world; generating a first image including at least a part of the first object and at least a part of the second object; and displaying the first image on the portable display apparatus.
It should be noted that the information processing apparatus may be an apparatus that performs game processing and generates an image based on the game processing, or may be a versatile apparatus such as a general personal computer. The portable display apparatus may have a size small enough to be carried by a user. Typically, the portable display apparatus may be a display apparatus that allows the user to view an image displayed thereon by holding it with both hands. Further, as in a terminal apparatus according to the embodiment described later, the portable display apparatus may or may not include components other than: means for outputting at least data based on the attitude and/or the motion of the portable display apparatus body; means for outputting touch position data based on a touch position on a touch panel provided on a surface of a display screen of the portable display apparatus; and a display screen that displays the first image.
Based on the above, when the first object and the second object appear in the virtual world, it is possible to control the action of the first object by an operation based on the attitude and/or the motion of the portable display apparatus body, and it is possible to control the action of the second object by a touch operation performed on the touch panel provided on a display screen of the portable display apparatus. This makes it possible to vary the operations of a user to be performed on a plurality of objects.
In addition, the information processing program may further cause the computer to execute calculating the attitude and/or the motion of the portable display apparatus on the basis of the body state data. In this case, the action of the first object may be controlled on the basis of the calculated attitude and/or motion of the portable display apparatus.
Based on the above, it is possible to calculate the attitude and/or the motion of the portable display apparatus using the body state data output from the portable display apparatus, and control the action of the first object on the basis of the attitude and/or the motion of the portable display apparatus.
In addition, the action of the first object may be controlled on the basis of the attitude and/or the motion of the portable display apparatus such that the first object rotates. The action of the second object may be controlled on the basis of the touch position data such that the second object moves.
Based on the above, the user can perform various operations such as: causing the first object to rotate, by performing the operation based on the attitude and/or the motion of the portable display apparatus body; and causing the second object to move, by performing the touch operation on the touch panel provided on the display screen of the portable display apparatus.
In addition, the action of the first object may be controlled such that the first object rotates relative to the second object. The action of the second object may be controlled such that the second object moves relative to the first object.
Based on the above, the user can perform various operations such as: causing the first object to rotate relative to the second object, by performing the operation based on the attitude and/or the motion of the portable display apparatus body; and causing the second object to move relative to the first object, by performing the touch operation on the touch panel provided on the display screen of the portable display apparatus.
In addition, the information processing program may further cause the computer to execute acquiring data based on a load applied to a load detection device. In this case, the second object may be controlled on the basis of the acquired data so as to move in a moving direction defined by a direction of the first object.
It should be noted that the load detection device may be, as an example, a device that detects a load applied to the load detection device with at least a part of the user's body placed thereon, and is turned on/off in accordance with the load. Such a device may be: one operated by the user mounted thereon with both soles in surface contact with the top surface of the device; one operated by the user with only one foot placed on the top surface of the device; one operated by the user with another part of the body (e.g., a hand) placed on the device; or the like.
Based on the above, it is also possible, by the operation performed by the user using the load detection device, to cause the second object to move in the direction defined by the direction of the first object. This enables the user to perform the operation of causing the second object to move relative to the first object using the load detection device, while adjusting the moving direction of the second object by moving the portable display apparatus while viewing the first image on the portable display apparatus, and also adjusting the relative positional relationship between the first object and the second object by operating the touch panel provided on the display screen on which the first image is displayed. This enables the user to perform an operation in an unprecedented operation environment.
In addition, only when the touch position data indicates that a touch operation is not being performed on the touch panel, the second object may be controlled on the basis of the acquired data so as to move.
Based on the above, during the touch operation performed on the touch panel, the operation performed on the second object using the load detection device becomes invalid, and the operation performed on the second object using the touch operation has priority.
In addition, the information processing program may further cause the computer to execute calculating, on the basis of the touch position data, a displacement of the touch position input to the touch panel. In this case, the second object may be controlled on the basis of the displacement of the touch position so as to move.
Based on the above, it is possible to cause the second object to move in the virtual world, by performing the operation of changing the touch position on the touch panel, such as the drag operation performed on the touch panel.
In addition, a moving direction in which the second object is to be caused to move may be calculated on the basis of a direction of the displacement of the touch position, and the second object may be controlled so as to move in the moving direction.
Based on the above, the moving direction of the second object is set on the basis of the direction in which the touch position on the touch panel is changed. This makes it possible to cause the second object to move in the direction desired by the user.
In addition, a direction corresponding to the direction of the displacement and included in the virtual world displayed so as to overlap the displacement of the touch position may be calculated as the moving direction, and the second object may be controlled so as to move in the moving direction.
Based on the above, it is possible to cause the second object to move in the same direction as the direction in which the touch position on the touch panel is changed. This makes it possible to cause the second object to move in an intuitive manner.
In addition, a moving distance at which the second object is to be caused to move may be calculated on the basis of an amount of the displacement of the touch position, and the second object may be controlled so as to move at the moving distance.
Based on the above, the moving distance of the second object is set on the basis of the amount of change in the touch position on the touch panel. This makes it possible to cause the second object to move at the distance desired by the user.
In addition, a distance corresponding to the amount of the displacement and included in the virtual world displayed so as to overlap the displacement of the touch position may be calculated as the moving distance, and the second object may be controlled so as to move at the moving distance.
Based on the above, it is possible to cause the second object to move at the same distance as the amount of change in the touch position on the touch panel. This makes it possible to cause the second object to move in an intuitive manner.
In addition, at least an attitude and/or a motion of the portable display apparatus that are obtained by rotating the portable display apparatus about a perspective direction of, and perpendicular to, a display screen of the portable display apparatus may be calculated. The action of the first object may be controlled in accordance with the attitude and/or the motion of the portable display apparatus that are obtained by rotating the portable display apparatus about the perspective direction.
Based on the above, it is possible to cause the first object to take action in the virtual world, by moving the portable display apparatus so as to rotate (roll) about the perspective direction of the display screen of the portable display apparatus.
In addition, the action of the first object may be controlled such that in accordance with a direction of rotation in which the portable display apparatus rotates about the perspective direction, the first object rotates or moves about a predetermined direction set in the virtual world and in a direction opposite to the direction of rotation.
Based on the above, when the portable display apparatus has been moved so as to rotate (roll) about the perspective direction of the display screen of the portable display apparatus, the first object displayed on the display screen rotates or moves in the direction opposite to the direction of rotation of the display screen. This makes it possible to, even when the display screen of the portable display apparatus has rotated in real space, display the first object with such a motion as not to follow the rotation of the portable display apparatus.
In addition, the action of the first object may be controlled such that the first object rotates or moves in accordance with an angle by which a facing direction of the portable display apparatus body changes about the perspective direction.
Based on the above, the user can control the action of the first object by changing the direction of the portable display apparatus.
In addition, the action of the first object may be controlled such that the first object rotates or moves by the same angle as the angle by which the facing direction of the portable display apparatus body changes.
Based on the above, the user can cause the first object to rotate or move by the same angle as the angle by which the attitude and/or the position of the portable display apparatus is changed.
In addition, the action of the first object may be controlled such that in accordance with the attitude and/or the motion of the portable display apparatus that are obtained by rotating the portable display apparatus about the perspective direction, the first object rotates or moves about a predetermined direction set in the virtual world.
Based on the above, it is possible to control the action of the first object with respect to the predetermined direction in the virtual world.
In addition, the action of the first object may be controlled such that on the basis of the attitude and/or the motion of the portable display apparatus with respect to a direction of gravity in real space, and in accordance with the attitude and/or the motion of the portable display apparatus that are obtained by rotating the portable display apparatus about the perspective direction, the first object rotates or moves about a direction of gravity set in the virtual world.
Based on the above, it is possible to control the action of the first object with respect to the direction of gravity in the virtual world.
In addition, the action of the first object may be controlled such that in accordance with a direction of rotation and an angle of rotation in and by which the portable display apparatus rotates about the perspective direction, the first object rotates about a predetermined direction in the virtual world in a direction opposite to the direction of rotation and by the angle of rotation. When the touch position data indicates an operation of dragging the touch panel, the action of the second object may be controlled such that in accordance with a moving direction and a moving distance of the touch position in the virtual world displayed on the display screen so as to overlap the touch position indicated by the touch position data, the second object moves along a plane perpendicular to the predetermined direction in the virtual world in the moving direction and at the moving distance.
Based on the above, when the portable display apparatus has been moved so as to rotate (roll) about the perspective direction of the display screen of the portable display apparatus, the first object displayed on the display screen rotates or moves in the direction opposite to the direction of rotation of the display screen and by the same angle. This makes it possible to, even when the display screen of the portable display apparatus has rotated, display only the first object always in the same direction in real space, and display the second object so as to rotate in real space. Further, when a drag operation has been performed on the touch panel of the portable display apparatus, it is possible to display the second object so as to move, following the drag operation.
In addition, the information processing program may further cause the computer to execute setting a first virtual camera for generating the first image, and controlling an attitude and/or a position of the first virtual camera on the basis of the calculated attitude and/or motion of the portable display apparatus. At least an attitude and/or a motion of the portable display apparatus that are obtained by rotating the portable display apparatus about a perspective direction of, and perpendicular to, a display screen of the portable display apparatus may be calculated. The action of the first object may be controlled such that in accordance with a direction of rotation and an angle of rotation in and by which the portable display apparatus rotates about the perspective direction, the first object rotates about a direction of a line of sight of the first virtual camera in the direction of rotation and by the angle of rotation. The attitude of the first virtual camera may be controlled such that in accordance with the direction of rotation and the angle of rotation in and by which the portable display apparatus rotates about the perspective direction, the first virtual camera rotates about the direction of the line of sight in the direction of rotation and by the angle of rotation. When the touch position data indicates an operation of dragging the touch panel, the action of the second object may be controlled such that in accordance with a moving direction and a moving distance of the touch position in the virtual world displayed on the display screen so as to overlap the touch position indicated by the touch position data, the second object moves along a plane perpendicular to the direction of the line of sight in the virtual world in a direction opposite to the moving direction and at the moving distance. When the touch position data indicates the operation of dragging the touch panel, the position of the first virtual camera may be controlled such that in accordance with the moving direction and the moving distance of the touch position in the virtual world displayed on the display screen so as to overlap the touch position indicated by the touch position data, the first virtual camera moves along the plane perpendicular to the direction of the line of sight in the virtual world in the direction opposite to the moving direction and at the moving distance.
Based on the above, when the portable display apparatus has been moved so as to rotate (roll) about the perspective direction of the display screen of the portable display apparatus, the first object displayed on the display screen rotates or moves relatively in the direction opposite to the direction of rotation of the display screen and by the same angle. This makes it possible to, even when the display screen of the portable display apparatus has rotated, display only the first object always in the same direction in real space, and display the second object so as to rotate in real space. Further, when a drag operation has been performed on the touch panel of the portable display apparatus, it is possible to display the second object so as to move relatively, following the drag operation.
In addition, the portable display apparatus may include at least one of a gyro sensor and an acceleration sensor. The attitude and/or the motion of the portable display apparatus may be calculated on the basis of data output from the at least one of the gyro sensor and the acceleration sensor.
Based on the above, using the data that is output from the gyro sensor and indicates the angular velocity generated in the portable display apparatus and/or the data that is output from the acceleration sensor and indicates the acceleration generated in the portable display apparatus, it is possible to accurately calculate the attitude and the motion of the portable display apparatus.
In addition, image data indicating the first image may be output to the portable display apparatus. The portable display apparatus may include an image data acquisition unit. The image data acquisition unit acquires the image data output from the information processing apparatus. A display screen of the portable display apparatus may display the first image indicated by the image data acquired by the image data acquisition unit.
Based on the above, the portable display apparatus can function as a so-called thin-client terminal, which does not perform information processing such as game processing.
In addition, the information processing program may further cause the computer to execute generating compression image data by compressing the image data indicating the first image. In this case, the generated compression image data may be output to the portable display apparatus. The image data acquisition unit may acquire the compression image data output from the information processing apparatus. The portable display apparatus may further include a display image decompression unit. The display image decompression unit decompresses the compression image data to obtain the image data indicating the first image. The display screen of the portable display apparatus may display the first image indicated by the image data that has been acquired by the image data acquisition unit and has been decompressed by the display image decompression unit.
Based on the above, the first image is decompressed before being output from the information processing apparatus to the portable display apparatus. This makes it possible to output the first image at a high speed, and reduce delay caused between the generation of the first image and the display of the first image on the portable display apparatus.
In addition, besides the first image, a second image representing the virtual world may be further displayed on another display apparatus connected to the information processing apparatus.
It should be noted that said another display apparatus described above is a display apparatus connected to the information processing apparatus, like a monitor 2 according to the embodiment described later. Said another display apparatus may be a component separate from the portable display apparatus, and may be any apparatus so long as it is capable of displaying the second image generated by the information processing apparatus. For example, said another display apparatus described above may be integrated with the information processing apparatus (in a single housing).
Based on the above, when processing based on the operation of moving the portable display apparatus is performed, it is possible to display the results of the processing not only on the portable display apparatus but also on said another display apparatus connected to the information processing apparatus. This enables the user to use, in accordance with the state of the operation or the user's preference, either one of images displayed on, for example, two apparatuses, and also view an image suitable for an operation of the user. Further, it is possible to use an image displayed on said another display apparatus connected to the information processing apparatus, as, for example, an image to be viewed by another person different from the user. This makes it possible to provide a viewing environment suitable also for the case where a plurality of people view the results of the processing.
In addition, the information processing program may further cause the computer to execute generating compression image data by compressing the image data indicating the first image. In this case, the generated compression image data may be output to the portable display apparatus, and, besides the compression image data, image data indicating the second image may be output to said another display apparatus without being compressed. The portable display apparatus may include an image data acquisition unit and a display image decompression unit. The image data acquisition unit acquires the compression image data output from the information processing apparatus. The display image decompression unit decompresses the compression image data to obtain the image data indicating the first image. A display screen of the portable display apparatus may display the first image indicated by the image data that has been acquired by the image data acquisition unit and has been decompressed by the display image decompression unit.
Based on the above, the first image is decompressed and then output from the information processing apparatus to the portable display apparatus. This makes it possible to output the first image at a high speed, and reduce delay caused between the generation of the first image and the display of the first image on the portable display apparatus.
In addition, an image including at least a part of the first object and at least a part of the second object in the virtual world viewed from a point of view different from a point of view toward the virtual world for generating the first image may be displayed as the second image on said another display apparatus.
Based on the above, the same virtual world is displayed not only on the portable display apparatus but also on said another display apparatus, and images of the virtual world that are different in the point of view are displayed thereon. This enables the user to use, in accordance with the state of the operation or the user's preference, either one of the images displayed on the two apparatuses when performing an operation.
In addition, a point of view toward the virtual world for generating the second image may be set at a position further away from the first object or the second object than a point of view toward the virtual world for generating the first image is from the first object or the second object. A range wider than a range of the virtual world represented by the first image may be displayed as the second image on said another display apparatus.
Based on the above, an image of the virtual world in a display range wider than that of an image of the virtual world displayed on the portable display apparatus is displayed on said another display apparatus connected to the information processing apparatus. This makes it possible to display on each display apparatus, for example, an image suitable for an operation of the user when the state of the virtual world is presented to the user.
In addition, a point of view for generating the second image may be set at a position of viewing from a bird's-eye view the first object and the second object in the virtual world. An image obtained by viewing from a bird's-eye view at least a part of the first object placed in the virtual world and at least a part of the second object placed in the virtual world may be displayed as the second image on said another display apparatus.
Based on the above, the same virtual world is displayed not only on the portable display apparatus but also on said another display apparatus, and images of the virtual world obtained by viewing it from a bird's-eye view are displayed on said another display apparatus. This makes it possible to display on each display apparatus, for example, an image suitable for an operation of the user when the state of the virtual world is presented to the user.
In addition, the information processing program may further cause the computer to execute setting a second virtual camera for generating the second image, and controlling an attitude and/or a position of the second virtual camera. In this case, the attitude of the second virtual camera may be controlled such that in accordance with a direction of rotation and an angle of rotation in and by which the portable display apparatus rotates about a perspective direction of, and perpendicular to, a display screen of the portable display apparatus and which are calculated on the basis of the body state data, the second virtual camera rotates about a direction of a line of sight in a direction opposite to the direction of rotation and by the angle of rotation.
Based on the above, when the portable display apparatus has been moved so as to rotate (roll) about the perspective direction of the display screen of the portable display apparatus, the virtual world displayed on another display apparatus is displayed so as to rotate in a similar manner to the portable display apparatus. This makes it possible to easily understand the positional relationship between the virtual world displayed on the portable display apparatus and the virtual world displayed on said another display apparatus.
In addition, the exemplary embodiment may be carried out in the forms of an information processing apparatus and an information processing system, each including units that perform the above processes, and an information processing method including the above operations.
The exemplary embodiment makes it possible to, when a plurality of objects appear in a virtual world, vary the operations of a user to be performed on the objects.
These and other objects, features, aspects and advantages of the exemplary embodiment will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.